﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VirtualTournaments.Biz.Tournaments;

namespace VirtualTournaments.Biz.Bets
{
    class TournamentBet: Bet
    {
        private Tournament mTournament;
        private Team mFirst;
        private Team mSecond;
        private Team mThird;

        public TournamentBet(Tournament aTournament, Team aFirst, Team aSecond, Team aThird)
        {
            this.mTournament = aTournament;
            this.mFirst = aFirst;
            this.mSecond = aSecond;
            this.mThird = aThird;
        }

        public override void calculateOdds(Agency agency, Bet[] otherBets)
        {
            throw new NotImplementedException();
        }

        public override bool won()
        {
            return mTournament.isFinished() &&
                this.mTournament.First.equals(mFirst) &&
                this.mTournament.Second.equals(mSecond) &&
                this.mTournament.Third.equals(mThird);
        }
    }
}
